//
// Created by fanghr on 17-12-25.
//

#ifndef PROJECT_SERVER_H
#define PROJECT_SERVER_H

#include "../include.h"
#include "session.h"

class server {
public:
    server(boost::asio::io_service &io_service, short port);

private:
    void start_accept();

    void handle_accept(session *new_session,
                       const boost::system::error_code &error);

    boost::asio::io_service &io_service_;
    boost::asio::ip::tcp::acceptor acceptor_;
};


#endif //PROJECT_SERVER_H
